const Router = require('koa-router');
const router = new Router();
const tool = require('../../tools/tool')
const {db, QueryTypes} = require("../../models/db");

router.post('/deliver/getCar', async ctx => {
    let tenantId = ctx.user.tenantId;
    let list = await db.models['cars'].findAll({
        where: {
            tenantId: tenantId
        },
        attributes: ['id',['licence', 'name'],'load','length','width','height']
    })
    return ctx.suc('', list)
})

module.exports = router;
